﻿using System;
using CI.Organism;

namespace CI.Interfaces
{
    /// <summary>
    /// Neural Cell type that is the backbone to processing
    /// </summary>
    public interface INeuron : ICell, ISynapticConnection
    {

        /// <summary> 
        /// List of the input Synapse
        /// </summary>
        ISynapseCollection InputSynapse { get; set; }

        /// <summary>
        /// List of the output Synapse
        /// </summary>
        ISynapseCollection OutputSynapse { get; set; }

        /// <summary>
        /// Threshold value where activation takes place on the resulting output value of the activation function
        /// </summary>
        Int64 ThresholdValue { get; }

        /// <summary>
        /// Last value evalated against the threshold by the Activation Function
        /// </summary>
        Int64 SummedInputValue { get; set; }

        /// <summary>
        /// Activation funciton to see if the neuron fires from its input and updates its outputs
        /// </summary>
        bool ActivationFunction(UInt32 neuralSystemHB);
        
        /// <summary>
        /// Notify that we have finised calculating the activation function
        /// </summary>
        event Action ActivationFunctionComplete;

        /// <summary>Neural system the neuron belongs to</summary>
        INeuralSystem NeuralSystem { get; }
    }
}
